import { MockAjax } from "@/mockApi/MockAjax";
import { customAlphabet } from "nanoid";
const nanoid = customAlphabet("123456789", 4);

const rankingTable = [
  {
    id: `${nanoid()}`,
    proname: "AppleiPhone 11",
    category: "手机",
    sales: `${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "Xiaomi小米电视",
    category: "家电",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "米家扫拖机器",
    category: "家电",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "美国短毛猫",
    category: "宠物活体",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "限量版迈凯轮",
    category: "汽车",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "AppleiPhone 11",
    category: "手机",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "Xiaomi小米电视",
    category: "家电",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "米家扫拖机器",
    category: "家电",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "美国短毛猫",
    category: "宠物活体",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "AppleiPhone 11",
    category: "手机",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "Xiaomi小米电视",
    category: "家电",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "米家扫拖机器",
    category: "家电",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "美国短毛猫",
    category: "宠物活体",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "限量版迈凯轮",
    category: "汽车",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "AppleiPhone 11",
    category: "手机",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "Xiaomi小米电视",
    category: "家电",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "米家扫拖机器",
    category: "家电",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "美国短毛猫",
    category: "宠物活体",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "AppleiPhone 11",
    category: "手机",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "Xiaomi小米电视",
    category: "家电",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "米家扫拖机器",
    category: "家电",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "美国短毛猫",
    category: "宠物活体",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "限量版迈凯轮",
    category: "汽车",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "AppleiPhone 11",
    category: "手机",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "Xiaomi小米电视",
    category: "家电",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "米家扫拖机器",
    category: "家电",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "美国短毛猫",
    category: "宠物活体",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "AppleiPhone 11",
    category: "手机",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "Xiaomi小米电视",
    category: "家电",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "米家扫拖机器",
    category: "家电",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "美国短毛猫",
    category: "宠物活体",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "限量版迈凯轮",
    category: "汽车",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "AppleiPhone 11",
    category: "手机",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "Xiaomi小米电视",
    category: "家电",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "米家扫拖机器",
    category: "家电",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
  {
    id: `${nanoid()}`,
    proname: "美国短毛猫",
    category: "宠物活体",
    sales: `￥${nanoid()}`,
    visited: `${nanoid()}`,
  },
];

export const ranks = new MockAjax("/api/mock-ranking");

ranks.initTable(rankingTable);
